package com.example.demo.entity.secondary;

import javax.persistence.*;

/**
 * Created by dongjunpeng on 2017/10/25.
 */
@Entity
@Table(name = "OUTERLINK_VESSEL", schema = "GZ_TACO", catalog = "")
public class OuterlinkVesselEntity {
    private String vesselCode;
    private String vesselNameCn;
    private String vesselNameEn;
    private String operatorCode;
    private String agent;
    private String vesselType;
    private Long lengthOverAll;
    private Long lengthBetweenPerpendiculars;
    private Long vesselWidth;
    private String imo;
    private String mmsi;
    private String callSign;
    private String flag;
    private Long bowToBridge;
    private Long sternToBridge;
    private Long grossTonnage;
    private Long netTonnage;
    private Long summerDraft;
    private Short maxCapacity;
    private Long deckMaxRow;
    private Long deckMaxTier;
    private Long holdMaxRow;
    private Long holdMaxTier;

    @Basic
    @Column(name = "VESSEL_CODE")
    public String getVesselCode() {
        return vesselCode;
    }

    public void setVesselCode(String vesselCode) {
        this.vesselCode = vesselCode;
    }

    @Basic
    @Column(name = "VESSEL_NAME_CN")
    public String getVesselNameCn() {
        return vesselNameCn;
    }

    public void setVesselNameCn(String vesselNameCn) {
        this.vesselNameCn = vesselNameCn;
    }

    @Basic
    @Column(name = "VESSEL_NAME_EN")
    public String getVesselNameEn() {
        return vesselNameEn;
    }

    public void setVesselNameEn(String vesselNameEn) {
        this.vesselNameEn = vesselNameEn;
    }

    @Basic
    @Column(name = "OPERATOR_CODE")
    public String getOperatorCode() {
        return operatorCode;
    }

    public void setOperatorCode(String operatorCode) {
        this.operatorCode = operatorCode;
    }

    @Basic
    @Column(name = "AGENT")
    public String getAgent() {
        return agent;
    }

    public void setAgent(String agent) {
        this.agent = agent;
    }

    @Basic
    @Column(name = "VESSEL_TYPE")
    public String getVesselType() {
        return vesselType;
    }

    public void setVesselType(String vesselType) {
        this.vesselType = vesselType;
    }

    @Basic
    @Column(name = "LENGTH_OVER_ALL")
    public Long getLengthOverAll() {
        return lengthOverAll;
    }

    public void setLengthOverAll(Long lengthOverAll) {
        this.lengthOverAll = lengthOverAll;
    }

    @Basic
    @Column(name = "LENGTH_BETWEEN_PERPENDICULARS")
    public Long getLengthBetweenPerpendiculars() {
        return lengthBetweenPerpendiculars;
    }

    public void setLengthBetweenPerpendiculars(Long lengthBetweenPerpendiculars) {
        this.lengthBetweenPerpendiculars = lengthBetweenPerpendiculars;
    }

    @Basic
    @Column(name = "VESSEL_WIDTH")
    public Long getVesselWidth() {
        return vesselWidth;
    }

    public void setVesselWidth(Long vesselWidth) {
        this.vesselWidth = vesselWidth;
    }

    @Basic
    @Column(name = "IMO")
    public String getImo() {
        return imo;
    }

    public void setImo(String imo) {
        this.imo = imo;
    }

    @Basic
    @Column(name = "MMSI")
    public String getMmsi() {
        return mmsi;
    }

    public void setMmsi(String mmsi) {
        this.mmsi = mmsi;
    }

    @Basic
    @Column(name = "CALL_SIGN")
    public String getCallSign() {
        return callSign;
    }

    public void setCallSign(String callSign) {
        this.callSign = callSign;
    }

    @Basic
    @Column(name = "FLAG")
    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    @Basic
    @Column(name = "BOW_TO_BRIDGE")
    public Long getBowToBridge() {
        return bowToBridge;
    }

    public void setBowToBridge(Long bowToBridge) {
        this.bowToBridge = bowToBridge;
    }

    @Basic
    @Column(name = "STERN_TO_BRIDGE")
    public Long getSternToBridge() {
        return sternToBridge;
    }

    public void setSternToBridge(Long sternToBridge) {
        this.sternToBridge = sternToBridge;
    }

    @Basic
    @Column(name = "GROSS_TONNAGE")
    public Long getGrossTonnage() {
        return grossTonnage;
    }

    public void setGrossTonnage(Long grossTonnage) {
        this.grossTonnage = grossTonnage;
    }

    @Basic
    @Column(name = "NET_TONNAGE")
    public Long getNetTonnage() {
        return netTonnage;
    }

    public void setNetTonnage(Long netTonnage) {
        this.netTonnage = netTonnage;
    }

    @Basic
    @Column(name = "SUMMER_DRAFT")
    public Long getSummerDraft() {
        return summerDraft;
    }

    public void setSummerDraft(Long summerDraft) {
        this.summerDraft = summerDraft;
    }

    @Basic
    @Column(name = "MAX_CAPACITY")
    public Short getMaxCapacity() {
        return maxCapacity;
    }

    public void setMaxCapacity(Short maxCapacity) {
        this.maxCapacity = maxCapacity;
    }

    @Basic
    @Column(name = "DECK_MAX_ROW")
    public Long getDeckMaxRow() {
        return deckMaxRow;
    }

    public void setDeckMaxRow(Long deckMaxRow) {
        this.deckMaxRow = deckMaxRow;
    }

    @Basic
    @Column(name = "DECK_MAX_TIER")
    public Long getDeckMaxTier() {
        return deckMaxTier;
    }

    public void setDeckMaxTier(Long deckMaxTier) {
        this.deckMaxTier = deckMaxTier;
    }

    @Basic
    @Column(name = "HOLD_MAX_ROW")
    public Long getHoldMaxRow() {
        return holdMaxRow;
    }

    public void setHoldMaxRow(Long holdMaxRow) {
        this.holdMaxRow = holdMaxRow;
    }

    @Basic
    @Column(name = "HOLD_MAX_TIER")
    public Long getHoldMaxTier() {
        return holdMaxTier;
    }

    public void setHoldMaxTier(Long holdMaxTier) {
        this.holdMaxTier = holdMaxTier;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        OuterlinkVesselEntity that = (OuterlinkVesselEntity) o;

        if (vesselCode != null ? !vesselCode.equals(that.vesselCode) : that.vesselCode != null) return false;
        if (vesselNameCn != null ? !vesselNameCn.equals(that.vesselNameCn) : that.vesselNameCn != null) return false;
        if (vesselNameEn != null ? !vesselNameEn.equals(that.vesselNameEn) : that.vesselNameEn != null) return false;
        if (operatorCode != null ? !operatorCode.equals(that.operatorCode) : that.operatorCode != null) return false;
        if (agent != null ? !agent.equals(that.agent) : that.agent != null) return false;
        if (vesselType != null ? !vesselType.equals(that.vesselType) : that.vesselType != null) return false;
        if (lengthOverAll != null ? !lengthOverAll.equals(that.lengthOverAll) : that.lengthOverAll != null)
            return false;
        if (lengthBetweenPerpendiculars != null ? !lengthBetweenPerpendiculars.equals(that.lengthBetweenPerpendiculars) : that.lengthBetweenPerpendiculars != null)
            return false;
        if (vesselWidth != null ? !vesselWidth.equals(that.vesselWidth) : that.vesselWidth != null) return false;
        if (imo != null ? !imo.equals(that.imo) : that.imo != null) return false;
        if (mmsi != null ? !mmsi.equals(that.mmsi) : that.mmsi != null) return false;
        if (callSign != null ? !callSign.equals(that.callSign) : that.callSign != null) return false;
        if (flag != null ? !flag.equals(that.flag) : that.flag != null) return false;
        if (bowToBridge != null ? !bowToBridge.equals(that.bowToBridge) : that.bowToBridge != null) return false;
        if (sternToBridge != null ? !sternToBridge.equals(that.sternToBridge) : that.sternToBridge != null)
            return false;
        if (grossTonnage != null ? !grossTonnage.equals(that.grossTonnage) : that.grossTonnage != null) return false;
        if (netTonnage != null ? !netTonnage.equals(that.netTonnage) : that.netTonnage != null) return false;
        if (summerDraft != null ? !summerDraft.equals(that.summerDraft) : that.summerDraft != null) return false;
        if (maxCapacity != null ? !maxCapacity.equals(that.maxCapacity) : that.maxCapacity != null) return false;
        if (deckMaxRow != null ? !deckMaxRow.equals(that.deckMaxRow) : that.deckMaxRow != null) return false;
        if (deckMaxTier != null ? !deckMaxTier.equals(that.deckMaxTier) : that.deckMaxTier != null) return false;
        if (holdMaxRow != null ? !holdMaxRow.equals(that.holdMaxRow) : that.holdMaxRow != null) return false;
        if (holdMaxTier != null ? !holdMaxTier.equals(that.holdMaxTier) : that.holdMaxTier != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = vesselCode != null ? vesselCode.hashCode() : 0;
        result = 31 * result + (vesselNameCn != null ? vesselNameCn.hashCode() : 0);
        result = 31 * result + (vesselNameEn != null ? vesselNameEn.hashCode() : 0);
        result = 31 * result + (operatorCode != null ? operatorCode.hashCode() : 0);
        result = 31 * result + (agent != null ? agent.hashCode() : 0);
        result = 31 * result + (vesselType != null ? vesselType.hashCode() : 0);
        result = 31 * result + (lengthOverAll != null ? lengthOverAll.hashCode() : 0);
        result = 31 * result + (lengthBetweenPerpendiculars != null ? lengthBetweenPerpendiculars.hashCode() : 0);
        result = 31 * result + (vesselWidth != null ? vesselWidth.hashCode() : 0);
        result = 31 * result + (imo != null ? imo.hashCode() : 0);
        result = 31 * result + (mmsi != null ? mmsi.hashCode() : 0);
        result = 31 * result + (callSign != null ? callSign.hashCode() : 0);
        result = 31 * result + (flag != null ? flag.hashCode() : 0);
        result = 31 * result + (bowToBridge != null ? bowToBridge.hashCode() : 0);
        result = 31 * result + (sternToBridge != null ? sternToBridge.hashCode() : 0);
        result = 31 * result + (grossTonnage != null ? grossTonnage.hashCode() : 0);
        result = 31 * result + (netTonnage != null ? netTonnage.hashCode() : 0);
        result = 31 * result + (summerDraft != null ? summerDraft.hashCode() : 0);
        result = 31 * result + (maxCapacity != null ? maxCapacity.hashCode() : 0);
        result = 31 * result + (deckMaxRow != null ? deckMaxRow.hashCode() : 0);
        result = 31 * result + (deckMaxTier != null ? deckMaxTier.hashCode() : 0);
        result = 31 * result + (holdMaxRow != null ? holdMaxRow.hashCode() : 0);
        result = 31 * result + (holdMaxTier != null ? holdMaxTier.hashCode() : 0);
        return result;
    }

    private String id;

    @Id
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
